<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>为什么选择易彩通</title>
<script type='text/javascript' src='js/jquery-1.4.2.min.js'></script>
		<script type='text/javascript' src='js/jquery.validate.min.js'></script>
		<script type='text/javascript' src='js/common.js'></script>
<link href="manage/manage.css" rel="stylesheet" type="text/css">
<script type="text/javascript"> 
    
    function deleteComment(comId)
	{
	 if(!confirm("您确定要删除该条信息?"))
	 {
	  return;
	 }
	 document.location.href="comment!delWhyChooes.action?delId="+comId;
	} 
	 //转至多少页码
	 function changePage(listId)
	 {
	  document.location.href="comment!listWhyChooes.action?pageNo="+listId;
	 } 
	 
	 //详细
	 function sendUpdateComment(comId)
	 {
	     document.location.href="comment!detailWhyChooes.action?detailId="+comId;
	 }
	
      function serachComment()
	  {
	  $("#serachWhyChooseForm").submit();
	  }
</script>
</head>
<body style="margin:0px; text-align:center;font-size:12px;" bgcolor="#F1F1F1" >
<div id="top">
 	<!-- 头部-->
 	<%@include file="mainTop.jsp"%>
</div>
<div id="top2"></div>

<!-- 中间-->
<div id="main1">
<!-- 左边-->
 <%@include file="mainLeft.jsp"%>
 <div class="mainr2">
<table width="789" height="500" border="0" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">

  <tr>
    <td height="500" align="left" valign="top">
	<table width="789" height="60" border="0" cellpadding="0" cellspacing="0" style="border-bottom:1px solid #DBDBDB; border-left:1px solid #DBDBDB;  " >
      <tr style="font-size:12px">
        <td width="84" align="center" background="images/line3.jpg"  style="border:1px solid #DBDBDB;"><a href="comment!listCommetnByCompany.action">公司公告</a></td>
         <td width="91" align="center" background="images/line3.jpg" style="border:1px solid #DBDBDB; "><a href="comment!listMeiti.action">媒体报道</a></td>
         <td width="101" align="center" background="images/line3.jpg" style="border:1px solid #DBDBDB; "><a href="comment!listHelpCenter.action">帮助中心</a></td>
              <td width="96" height="22" align="center" bgcolor="#FFFFFF" style="border-top:1px solid #DBDBDB; border-right:1px solid #DBDBDB;" >为什么选择易彩通</td>
         <td width="269"  align="left">&nbsp;</td>
      </tr>
	  
      <tr>
        <td height="37" colspan="8" align="center" valign="top" style="border-right:1px solid #FFFFFF">
		<table width="784" height="37" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="font-size:12px">
          <tr  align="left">
            <td width="778" height="37"  valign="middle" class="STYLE20">
            <s:form name="serachWhyChooseForm" id="serachWhyChooseForm" action="comment!listWhyChooes.action" method="post">
			 <table width="784" height="33" border="0" cellpadding="0" cellspacing="0" style="font-size:12px;" bgcolor="#FFFFFF">
				  <tr>
                    <td width="94" height="33" align="right" valign="bottom">标题:</td>
                    <td width="168" align="left" valign="bottom">
                    <input type="text" name="title" id="title" value="${title}"></td>
                    <td width="522" valign="bottom"><img src="images/ck.jpg" width="42" height="21" onClick="serachComment();"></td>
                  </tr>
                </table>		
				</s:form>
			    </td>
              </tr>
            </table>   </td>
        </tr>
        </table>
        <s:if test="pageObj.data.size()>0"><!-- 如果有模块分组列表显示数据 -->
          <table width="787"  border="0" cellpadding="0" cellspacing="0" style="font-size:12px">
            <tr>
              <td width="149" height="29" align="center" background="images/lm1_bg.jpg">标题</td>
              <td width="11" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="25" /></td>
              <td width="134" align="center" background="images/lm1_bg.jpg">时间</td>
              <td width="10" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="25" /></td>
              <td width="278" align="center" background="images/lm1_bg.jpg">内容</td>
              <td width="11" align="center" background="images/lm1_bg.jpg"><img src="images/line2.jpg" width="10" height="25" /></td>
              <td width="157" align="center" background="images/lm1_bg.jpg">操作</td>
            </tr>
             <!-- 开始数据显示 -->
            <s:iterator value="pageObj.data" var="whyC" status="st">
            <s:if test="#st.odd"><tr bgcolor="#FFFFFF"></tr> </s:if>
            <s:else> <tr bgcolor="#F7F7F7"></s:else>
             <td height="30" align="center" ><div style="width:189px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">${whyC.title}</div></td>
              <td>&nbsp;</td>
              <td align="center" >
              &nbsp;&nbsp; <s:date name="#whyC.commentTime" format="yyyy-MM-dd  HH:mm:ss"/>
              </td>
              <td>&nbsp;</td>
              <td align="center">
              <div style="width:189px; white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">${whyC.content}</div>
              </td>
              <td align="center">&nbsp;</td>
              <td align="center"><a href="javaScript:sendUpdateComment('${whyC.id}');" >编辑</a>|<a href="javaScript:deleteComment('${whyC.id}');">删除</a></td>   </tr>
            
            </s:iterator>
             <tr>
            <s:if test="pageObj.totalRecord>10">
               <td height="29" align="center" background="images/lm1_bg.jpg" ><a href="<%=basePath%>/manage/addWhyChooes.jsp" >添加新选择 </a></td>
               <td height="29" colspan="8" align="right" background="images/lm1_bg.jpg" >
              <a href="comment!listWhyChooes.action?pageNo=1">首页</a>&nbsp;
                <s:if test="pageObj.hasPrePage==false" >上一页</s:if>
                <s:else> <a href="comment!listWhyChooes.action?pageNo=<s:property value="pageObj.pageNo-1"/>">上一页</a></s:else>
   
              &nbsp;<s:if test="pageObj.hasNextPage==false">下一页</s:if>
              <s:else> <a href="comment!listWhyChooes.action?pageNo=<s:property value="pageObj.pageNo+1"/>" >下一页</a></s:else>
              
              &nbsp; <s:if test="pageObj.pageNo==pageObj.totalPage">末页</s:if>
       <s:else><a href="comment!listWhyChooes.action?pageNo=<s:property value="pageObj.totalPage"/>" >末页</a></s:else>
      &nbsp;&nbsp;第${pageObj.pageNo}页
              &nbsp;|&nbsp;共${pageObj.totalPage}页&nbsp;|&nbsp;共${pageObj.totalRecord}条 转至
            <s:select list="pageObj.listNum" onchange="changePage(this.value)" id="pageNo" name="pageNo">
            </s:select>
               </td>
               </s:if>
               <s:else> 
               <td height="29" colspan="6" background="images/lm1_bg.jpg" >&nbsp;</td>
                <td  height="29"  align="center" background="images/lm1_bg.jpg" ><a href="<%=basePath%>/manage/addWhyChooes.jsp">添加新选择 </a></td>
            </s:else>
            </tr>
      </table>
      </s:if>  
      <s:else><p style="color: red;font-size: 12px;text-align: center;">您还没有增加相关信息!&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="<%=basePath%>/manage/addWhyChooes.jsp">立刻添加</a></p></s:else>
      </td>
      </tr>
    </table></td>
  </tr>
</table></td>
  </tr>
</table></td>
  </tr>
</table></td>
  </tr>
 </div>

</div>


</body>
</html>
